//
//  GiftBeforeModel.m
//  礼物说
//
//  Created by dllo on 16/5/3.
//  Copyright © 2016年 sunzhichao. All rights reserved.
//

#import "GiftBeforeModel.h"

@implementation GiftBeforeModel

- (void)dealloc{
    
    [_dataArr release];
    [_name release];
    [super dealloc];
    
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
    if ([key isEqualToString:@"subcategories"]) {
        self.dataArr = [NSMutableArray array];
        
        for (NSDictionary * dic  in value) {
            
            GiftModel * model = [[GiftModel alloc] init];
            [model setValuesForKeysWithDictionary:dic];
            [_dataArr addObject:model];
            [model release];
        }
    }
}


@end
